package com.icangya.DAO.impl;

import com.icangya.DAO.IRwShopVipDAO;
import com.icangya.domain.Admin;
import com.icangya.domain.RwShopVip;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class RwShopVipDAOImpl extends  BaseDAO<RwShopVip> implements IRwShopVipDAO {

    Logger logger = LoggerFactory.getLogger(this.getClass());

    /**
     * 根据userid获取vip用户
     */
    public List<RwShopVip> getVipUserByuserid(long userid){
        String hql="FROM RwShopVip aa where aa.userid=?";

        List<RwShopVip> list=(List<RwShopVip>) getHibernateTemplate().find(hql,userid);
        if(list.size() > 0 && !list.isEmpty()){
            return list;
        }


        return null;
    }

}
